Skip to main content

Alter Margin

Type POST

Description: /future/user/v1/position/margin

Parameters

NameTypeMandatoryDefaultDescription
symbolstringYesN/ATrading pair
marginnumberNoN/AQuantity
positionSidestringNoN/APosition side (LONG, SHORT)
typestringNoN/AAdjust direction (ADD: add isolated margin, SUB: reduce isolated margin)

Limit Flow Rules

200/s/apikey

Request Example

Request
curl -X POST "https://fapi.xt.com/future/user/v1/position/margin" \
-H "validate-appkey: $APPKEY" \ # Required
-H "validate-timestamp: $TIMESTAMP" \ # Required
-H "validate-singature: $SINGATURE" \ # Required
-H "Content-Type: application/x-www-form-urlencoded" \ # Required
-d "symbol=btc_usdt" \ # Required
-d "margin=9999" \
-d "positionSide=SHORT" \
-d "type=ADD"

Response Example

Response
{
"error": {
"code": "",
"msg": ""
},
"msgInfo": "",
"result": {},
"returnCode": 0
}

Error code

Error codeDesc
invalid_paramsMissing parameters
invalid_marginInvalid margin